<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="add" scope="page" class="dsp.database.Operation"/>
<%
//int id = Integer.parseInt(request.getParameter("id"));
String sql = "UPDATE web_data SET counter=counter+1 WHERE id=" +id;
add.update(sql);
sql = "SELECT * FROM web_data WHERE id=" +id;
ResultSet rs = add.query(sql);

if(rs.next()){
	String f =rs.getString("newsfile");
	add.closestmt();
	add.closeconn();
	response.sendRedirect("articles/"+f);
	
}
%>